<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="root">

    </div>
</body>
<!-- 引入 react v18 js核心库 -->
<script  src="https://unpkg.com/react@18/umd/react.development.js"></script>
<!-- 引入react v18 react dom库 -->
<script  src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"></script>
<script>
    console.log(React)
    // 创建虚拟DOM
    let dom = React.createElement("h1",{id:"h1"},"react18的使用");
    console.log(dom)
    console.log(ReactDOM)
    // 创建根标签
    let root = ReactDOM.createRoot(document.getElementById("root"));
    console.log(root)
    root.render(dom)
    // ReactDOM.render(dom,document.getElementById("root"))
</script>

</html>